package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OIDemo {
    public static void main(String[] args) throws IOException, ClassCastException, ClassNotFoundException {
        FileInputStream fis =new FileInputStream("person.boj");
        ObjectInputStream ios =new ObjectInputStream(fis);

        Person person =(Person) ios.readObject();
        System.out.println(person);
        ios.close();

    }
}
